home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / programm.ing / winlib.lzh / WINLIB / INTTITLE.C < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-23  |  5.1 KB  |  122 lines

  1. /********************************************************************
  2.  *                                                                    *
  3.  *    Internal title routines                                            *
  4.  *    by Ken Hollis                                                    *
  5.  *                                                                    *
  6.  *    Copyright (C) 1994, Bitgate Software and Clever Bits            *
  7.  *    All rights reserved                                                *
  8.  *                                                                    *
  9.  *    These are the internal title routines that are shown at boot    *
  10.  *    time, to tell the user what is happening.  They are strictly    *
  11.  *    for informative purposes.  Nothing more.                        *
  12.  *                                                                    *
  13.  ********************************************************************
  14.  *                                                                    *
  15.  *    Update log:                                                        *
  16.  *                                                                    *
  17.  *    [20.2.94] Ken Hollis                                            *
  18.  *        TShowTitle            - added                                    *
  19.  *        TChangeTitleText    - added                                    *
  20.  *        TEndTitle            - added                                    *
  21.  *        TInitTitle            - added                                    *
  22.  *                                                                    *
  23.  ********************************************************************/
  24.  
  25. #include "winlib.h"
  26.  
  27. static char ptn[1] = "";
  28.  
  29. TEDINFO tt_tedinfo[] = {
  30.   {"                              ", ptn, ptn, 3,   0,   2, 4480,   0,   1,  31,   1}
  31. };
  32.  
  33. int titleblock[] = {
  34.   0x7f80,0x03e0,0x00ff,0x3f80,0x0000,0x01fc,0x0000,0x1fcf,
  35.   0xe000,0x0000,0x0055,0x5550,0x0000,0x0000,0x0000,0x7f80,
  36.   0x07f0,0x00ff,0x3f80,0x0000,0x01fc,0x0000,0x1fcf,0xe000,
  37.   0x0000,0x00aa,0xaaa8,0x0000,0x0000,0x0000,0x3fc0,0x07f0,
  38.   0x01fe,0x3f80,0x0000,0x01fc,0x0000,0x1fcf,0xe000,0x0000,
  39.   0x0055,0x5554,0x0000,0x0000,0x0000,0x3fc0,0x0ff8,0x01fe,
  40.   0x0000,0x0000,0x01fc,0x0000,0x000f,0xe000,0x0000,0x00aa,
  41.   0x00aa,0x0000,0x0000,0x0000,0x1fe0,0x0ff8,0x03fc,0x0000,
  42.   0x0000,0x01fc,0x0000,0x000f,0xe000,0x0000,0x0154,0x0055,
  43.   0x0000,0x0000,0x0000,0x1fe0,0x1ffc,0x03fc,0x3f9f,0xc3fc,
  44.   0x01fc,0x0000,0x1fcf,0xe1ff,0x0000,0x00a8,0x00aa,0x0a0a,
  45.   0xa802,0xaa80,0x0ff0,0x1ffc,0x07f8,0x3f9f,0xcfff,0x01fc,
  46.   0x0000,0x1fcf,0xe7ff,0xc000,0x0154,0x0055,0x1555,0x5415,
  47.   0x5540,0x0ff0,0x1ffc,0x07f8,0x3f9f,0xffff,0xc1fc,0x0000,
  48.   0x1fcf,0xffff,0xf000,0x02a8,0x00aa,0x2aaa,0xa8aa,0xaaa8,
  49.   0x07f8,0x3f7e,0x0ff0,0x3f9f,0xfc3f,0xe1fc,0x0000,0x1fcf,
  50.   0xfe0f,0xf800,0x0150,0x0154,0x1554,0x0155,0x0554,0x07f8,
  51.   0x3f7e,0x0ff0,0x3f9f,0xf00f,0xf1fc,0x0000,0x1fcf,0xf803,
  52.   0xfc00,0x02a8,0x0aa8,0x2aa0,0x02a8,0x00aa,0x03fc,0x7e3f,
  53.   0x1fe0,0x3f9f,0xe007,0xf1fc,0x0000,0x1fcf,0xf001,0xfc00,
  54.   0x0555,0x5550,0x5540,0x0550,0x0154,0x03fc,0x7e3f,0x1fe0,
  55.   0x3f9f,0xe007,0xf9fc,0x0000,0x1fcf,0xf001,0xfe00,0x02aa,
  56.   0xaa80,0x2a80,0x0aa0,0x00aa,0x01fe,0x7e3f,0x3fc0,0x3f9f,
  57.   0xc003,0xf9fc,0x0000,0x1fcf,0xe000,0xfe00,0x0555,0x5400,
  58.   0x5500,0x0540,0x0054,0x01fe,0xfc1f,0xbfc0,0x3f9f,0xc003,
  59.   0xf9fc,0x0000,0x1fcf,0xe000,0xfe00,0x0aa0,0x0000,0xaa00,
  60.   0x0aa0,0x00a8,0x00ff,0xfc1f,0xff80,0x3f9f,0xc003,0xf9fc,
  61.   0x0000,0x1fcf,0xe000,0xfe00,0x0540,0x0000,0x5400,0x1540,
  62.   0x0154,0x00ff,0xf80f,0xff80,0x3f9f,0xc003,0xf9fc,0x0000,
  63.   0x1fcf,0xf001,0xfe00,0x0aa0,0x0000,0xaa00,0x0a80,0x02a8,
  64.   0x007f,0xf80f,0xff00,0x3f9f,0xc003,0xf9fc,0x0000,0x1fcf,
  65.   0xf001,0xfc00,0x1540,0x0001,0x5400,0x1540,0x0550,0x007f,
  66.   0xf80f,0xff00,0x3f9f,0xc003,0xf9fc,0x0000,0x1fcf,0xf803,
  67.   0xfc00,0x0a80,0x0000,0xa800,0x0aa0,0x0aa0,0x003f,0xf007,
  68.   0xfe00,0x3f9f,0xc003,0xf9fc,0x0000,0x1fcf,0xfe0f,0xf800,
  69.   0x1540,0x0001,0x5400,0x0550,0x1540,0x003f,0xf007,0xfe00,
  70.   0x3f9f,0xc003,0xf9ff,0xffff,0x9fcf,0xffff,0xf000,0x2a80,
  71.   0x0002,0xa800,0x02aa,0xaa80,0x001f,0xe003,0xfc00,0x3f9f,
  72.   0xc003,0xf9ff,0xffff,0x9fcf,0xe7ff,0xc000,0x1500,0x0001,
  73.   0x5000,0x0155,0x5400,0x001f,0xe003,0xfc00,0x3f9f,0xc003,
  74.   0xf9ff,0xffff,0x9fcf,0xe1ff,0x0000,0x2a80,0x0002,0xa800,
  75.   0x00aa,0xa000
  76. };
  77.  
  78. BITBLK tt_bitblk[] = {
  79.   {titleblock,  0x001e, 0x0016, 0x0000, 0x0000, 0x0001}
  80. };
  81.  
  82. static char string_1[] = "By Ken Hollis and Karl Ã˜ygard";
  83. static char string_2[] = "From Bitgate PD and Clever Bits";
  84.  
  85. OBJECT tt_object[] = {
  86.   /* Tree #0*/
  87.   {  -1,   1,   1,0x0014,0x0000,0x0000, (long)(0x00001173L),   0,   0,1570,  10},
  88.   {   0,   2,   6,0x0014,FL3DBAK,DRAW3D, (long)(0x00021100L), 768, 768,  34, 521},
  89.   {   4,   3,   3,0x0017,0x0000,0x0000, (long)(&tt_bitblk[0]),   2,1024,  30,1538},
  90.   {   2,  -1,  -1,0x1117,0x0000,0x0000, (long)(0x000000faL), 276,   0,  10,1794},
  91.   {   5,  -1,  -1,0x0016,FL3DACT,DRAW3D, (long)(&tt_tedinfo[0]),   1,   4,  32,   2},
  92.   {   6,  -1,  -1,0x001c,0x0000,0x0000, (long)(string_1),1026,1798,  29,   1},
  93.   {   1,  -1,  -1,0x001c,0x0020,0x0000, (long)(string_2),1025,1799,  31,   1}
  94. };
  95.  
  96. OBJECT *TITLE = tt_object;
  97.  
  98. GLOBAL void TInitTitle(void)
  99. {
  100.     RFix_ObjectPos(TITLE);
  101.     fix_object(TITLE, TRUE);
  102.     form_center(TITLE, &TITLE->ob_x, &TITLE->ob_y, &TITLE->ob_width, &TITLE->ob_height);
  103. }
  104.  
  105. GLOBAL void TShowTitle(void)
  106. {
  107.     form_dial(0, TITLE->ob_x, TITLE->ob_y, TITLE->ob_width, TITLE->ob_height,
  108.             TITLE->ob_x, TITLE->ob_y, TITLE->ob_width, TITLE->ob_height);
  109.     objc_draw(TITLE, 0, 99, TITLE->ob_x, TITLE->ob_y, TITLE->ob_width, TITLE->ob_height);
  110. }
  111.  
  112. GLOBAL void TEndTitle(void)
  113. {
  114.     form_dial(3, TITLE->ob_x, TITLE->ob_y, TITLE->ob_width, TITLE->ob_height,
  115.             TITLE->ob_x, TITLE->ob_y, TITLE->ob_width, TITLE->ob_height);
  116. }
  117.  
  118. GLOBAL void TChangeTitleText(char *text)
  119. {
  120.     ChangeObjectText(TITLE, 4, text, 5, TE_CNTR);
  121.     objc_draw(TITLE, 4, 99, desk.g_x, desk.g_y, desk.g_w, desk.g_h);
  122. }